/**
 * 此模块用于维护支付接口
 */

import request from '@/utils/request'

/**
 * @desc https://www.showdoc.com.cn/2077491945864902/9444241600678120
 * @param orderId 支付订单ID
 * @returns Promise
 */
export const placeOrder = (orderId) => {
  return request({
    method: 'GET',
    url: `/api/payment/weixin/createNative/${orderId}`
  })
}

/**
 * @desc https://www.showdoc.com.cn/2077491945864902/9444241600678120
 * @param orderId 支付订单ID
 * @returns Promise
 */
export const paymentStatus = (orderId) => {
  return request({
    method: 'GET',
    url: `/api/payment/weixin/queryPayStatus/${orderId}`
  })
}

export const orderList = (page, limit) => {
  return request({
    method: 'GET',
    url: `/api/order/auth/${page}/${limit}`
  })
}
